﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Windows;

namespace Bixas.Tangibilis.Controls.Primitives
{
    public delegate void TouchDragStartedEventHandler(object sender, TouchDragStartedEventArgs e);

    public class TouchDragStartedEventArgs : RoutedEventArgs
    {
        // Fields
        private double _horizontalOffset;
        private double _verticalOffset;

        // Methods
        public TouchDragStartedEventArgs(double horizontalOffset, double verticalOffset)
        {
            this._horizontalOffset = horizontalOffset;
            this._verticalOffset = verticalOffset;
            base.RoutedEvent = TouchThumb.TouchDragStartedEvent;
        }

        protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget)
        {
            TouchDragStartedEventHandler handler = (TouchDragStartedEventHandler)genericHandler;
            handler(genericTarget, this);
        }

        // Properties
        public double HorizontalOffset
        {
            get
            {
                return this._horizontalOffset;
            }
        }

        public double VerticalOffset
        {
            get
            {
                return this._verticalOffset;
            }
        }
    }

    public delegate void TouchDragDeltaEventHandler(object sender, TouchDragDeltaEventArgs e);

    public class TouchDragDeltaEventArgs : RoutedEventArgs
    {
        // Fields
        private double _horizontalChange;
        private double _verticalChange;
        private double _motionSpeed;
        // Methods
        public TouchDragDeltaEventArgs(double horizontalChange, double verticalChange, double motionSpeed)
        {
            this._horizontalChange = horizontalChange;
            this._verticalChange = verticalChange;
            this._motionSpeed = motionSpeed;
            base.RoutedEvent = TouchThumb.TouchDragDeltaEvent;
        }

        protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget)
        {
            TouchDragDeltaEventHandler handler = (TouchDragDeltaEventHandler)genericHandler;
            handler(genericTarget, this);
        }

        // Properties
        public double HorizontalChange
        {
            get
            {
                return this._horizontalChange;
            }
        }

        public double VerticalChange
        {
            get
            {
                return this._verticalChange;
            }
        }

        public double MotionSpeed
        {
            get
            {
                return this._motionSpeed;
            }
        }
    }

    public delegate void TouchDragCompletedEventHandler(object sender, TouchDragCompletedEventArgs e);

    public class TouchDragCompletedEventArgs : RoutedEventArgs
    {
        // Fields
        private double _horizontalChange;
        private double _verticalChange;
        private double _motionSpeed;
        private bool _wasCanceled;

        // Methods
        public TouchDragCompletedEventArgs(double horizontalChange, double verticalChange, double motionSpeed, bool canceled)
        {
            this._horizontalChange = horizontalChange;
            this._verticalChange = verticalChange;
            this._motionSpeed = motionSpeed;
            this._wasCanceled = canceled;
            base.RoutedEvent = TouchThumb.TouchDragCompletedEvent;
        }

        protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget)
        {
            TouchDragCompletedEventHandler handler = (TouchDragCompletedEventHandler)genericHandler;
            handler(genericTarget, this);
        }

        // Properties
        public bool Canceled
        {
            get
            {
                return this._wasCanceled;
            }
        }

        public double HorizontalChange
        {
            get
            {
                return this._horizontalChange;
            }
        }

        public double VerticalChange
        {
            get
            {
                return this._verticalChange;
            }
        }

        public double MotionSpeed
        {
            get
            {
                return this._motionSpeed;
            }
        }
    }

 
 

 
 


}
